package com.example.service.impl;

import com.example.service.ChooseBeanService;
import org.springframework.stereotype.Service;

import javax.annotation.Priority;

/**
 * @author long
 */
@Priority(-1) // 如果不加这个注解，那么根据优先级获取bean时就会排除这个bean
@Service
public class ChooseBeanServiceImplB implements ChooseBeanService {

    @Override
    public String getBeanName() {
        return "B对象";
    }

}
